package com.jiang.daily.Q3375;

import java.util.HashSet;
import java.util.Set;

/**
 * @author Jiang
 * @version 1.0
 * @date 2025/04/09 9:53
 */
public class Solution {
    public int minOperations(int[] nums, int k) {
        Set<Integer> set = new HashSet<>();
        for (int num : nums) {
            if (num < k) return -1;
            else if (num > k) set.add(num);
        }
        return set.size();
    }
}
